<!--问题详情post.html里面展示答案的页面-->
<ul class="comments">
    {% for answer in answers %}
    <li class="comment">
        <div class="comment-thumbnail">
            <a href="{{ url_for('.user', id=answer.author.id) }}">
                <img class="img-rounded profile-thumbnail" src=" ">
            </a>
        </div>
        <div class="comment-content">
            <div class="comment-date">{{ moment(answer.timestamp).fromNow() }}</div>
            <div class="comment-author"><a href="{{ url_for('.user', id=answer.author.id) }}">{{ answer.author.username }}</a></div>
            <div class="comment-body">
                {% if answer.disabled %}
                <p><i>依据相关法律法规,此条答案不可显示.</i></p>
                {% endif %}
                {% if moderate or not answer.disabled %}
                    {% if answer.body_html %}
                        {{ answer.body_html | safe }}
                    {% else %}
                        {{ answer.body }}
                    {% endif %}
                {% endif %}
            </div>
            {% if moderate %}
                <br>
                {% if answer.disabled %}
                <a class="btn btn-default btn-xs" href="{{ url_for('.moderate_enable', id=answer.id, page=page) }}">Enable</a>
                {% else %}
                <a class="btn btn-danger btn-xs" href="{{ url_for('.moderate_disable', id=answer.id, page=page) }}">Disable</a>
                {% endif %}
            {% endif %}

            {% if not current_user.is_agreeing(answer) %}
                <a href="{{ url_for('.agree', id=answer.id) }}" class="btn btn-primary">已有{{ answer.agreements_num }}赞同</a>
            {% else %}
                <a href="{{ url_for('.unagree', id=answer.id) }}" class="btn btn-default">已有{{ answer.agreements_num }}赞同</a>
            {% endif %}

            <a href="{{ url_for('main.comment', id=answer.id) }}#comments">
                    <span class="label label-primary">评论 {{ answer.comments.count() }} </span>
            </a>

        </div>
    </li>
    {% endfor %}
</ul>
